import request from '@/utils/request'

// 获取优化脑图
export function getOptimizationMinder(query) {
  return request({
    url: '/fmea/common/optimization/getOptimizationMinder',
    method: 'get',
    params: query
  })
}

// 获取优化表格
export function getFmeaTable(query) {
  return request({
    url: '/fmea/common/optimization/fmeaGridList',
    method: 'get',
    params: query
  })
}

// 优化 分配
export function optimize(data) {
  return request({
    url: '/fmea/common/optimization',
    method: 'post',
    data: data
  })
}

// 优化 不执行
export function notExecuted(query) {
  return request({
    url: '/fmea/common/optimization/notExecuted',
    method: 'get',
    params: query
  })
}

// 优化 撤回
export function withdraw(query) {
  return request({
    url: '/fmea/common/optimization/withdraw',
    method: 'get',
    params: query
  })
}

// 优化 整改
export function rectify(data) {
  return request({
    url: '/fmea/common/optimization/rectify',
    method: 'post',
    data: data
  })
}

// 优化 跟踪
export function track(data) {
  return request({
    url: '/fmea/common/optimization/track',
    method: 'post',
    data: data
  })
}

// 优化 日志
export function log(query) {
  return request({
    url: '/fmea/common/optimization/list',
    method: 'get',
    params: query
  })
}

// 结果文件化 mfmea dvp
export function mfmeaOptimizationDvp(query) {
  return request({
    url: '/fmea/common/optimization/mfmeaOptimizationDvp',
    method: 'get',
    params: query
  })
}

export function exportMfOptimizationDvp(query) {
  return request({
    url: '/fmea/common/optimization/mfmeaOptimizationDvpExport',
    method: 'get',
    params: query
  })
}

// 结果文件化 dfmea dvp
export function dfmeaOptimizationDvp(query) {
  return request({
    url: '/fmea/common/optimization/dfmeaOptimizationDvp',
    method: 'get',
    params: query
  })
}

export function exportDfOptimizationDvp(query) {
  return request({
    url: '/fmea/common/optimization/dfmeaOptimizationDvpExport',
    method: 'get',
    params: query
  })
}
